<aside class="main-sidebar">
    <section class="sidebar">
      <#--  <@shiro.authenticated>
                真实名称
        </@shiro.authenticated>
        <@shiro.notAuthenticated>
                亲,请登录
        </@shiro.notAuthenticated>-->
        <!-- search form -->
        <form action="#" method="get" class="sidebar-form">
            <div class="input-group">
                <input type="text" name="q" class="form-control" placeholder="Search...">
                <span class="input-group-btn">
                <button type="submit" name="search" id="search-btn" class="btn btn-flat"><i class="fa fa-search"></i>
                </button>
              </span>
            </div>
        </form>
        <ul class="sidebar-menu" data-widget="tree">
            <@shiro.hasPermission name="role/list">
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-dashboard"></i> <span>系统管理</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                     <@shiro.hasPermission name="permission/list">
                    <li name="permission"><a href="/permission/list.do"><i class="fa fa-circle-o"></i> 权限管理</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="role/list">
                    <li name="role"><a href="/role/list.do"><i class="fa fa-circle-o"></i> 角色管理</a></li>
                    </@shiro.hasPermission>
                </ul>
            </li>
            </@shiro.hasPermission>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-cog"></i> <span>部门管理</span>
                    <span class="pull-right-container">
                        <i class="fa fa-angle-left pull-right"></i>
                    </span>
                </a>
                <ul class="treeview-menu">
                    <@shiro.hasPermission name="department/list">
                    <li name="departmentAdmin"><a href="/department/list.do"><i class="fa fa-circle-o"></i> 超管-部门信息管理</a></li>
                    </@shiro.hasPermission>

                    <li name="department"><a href="/department/listAsso.do"><i class="fa fa-circle-o"></i> 部门管理</a></li>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-files-o"></i>
                    <span>用户信息管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <@shiro.hasPermission name="association/list">
                    <li name="association"><a href="/association/list.do"><i class="fa fa-circle-o"></i> 超管-社团信息管理</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="member/list">
                    <li name="memberAdmin"><a href="/member/list.do"><i class="fa fa-circle-o"></i> 超管-社团成员信息管理</a></li>
                    </@shiro.hasPermission>

                    <@shiro.hasPermission name="association/myassociation">
                    <li name="myassociation"><a href="/association/myassociation.do"><i class="fa fa-circle-o"></i> 我的社团</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="association/addassociation">
                    <li name="addassociation"><a href="/association/addassociation.do"><i class="fa fa-circle-o"></i> 加入社团</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="association/createassociation">
                    <li name="createassociation"><a href="/association/createassociation.do"><i class="fa fa-circle-o"></i> 创建社团</a></li>
                    </@shiro.hasPermission>

                    <li name="member"><a href="/member/listAsso.do"><i class="fa fa-circle-o"></i> 社团成员信息管理</a></li>
                </ul>
            </li>

            <li class="treeview">
                <a href="#">
                    <i class="fa fa-pie-chart"></i>
                    <span>活动管理</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <@shiro.hasPermission name="activity/admin/list">
                    <li name="activityAdmin"><a href="/activity/admin/list.do"><i class="fa fa-circle-o"></i> 超管-活动信息管理</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="activityRecord/list">
                    <li name="activityRecordAdmin"><a href="/activityRecord/list.do"><i class="fa fa-circle-o"></i> 超管-报名记录管理</a></li>
                    </@shiro.hasPermission>

                    <@shiro.hasPermission name="activity/member/list">
                    <li name="activity"><a href="/activity/member/list.do"><i class="fa fa-circle-o"></i> 学生-活动列表</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="activityRecord/member/list">
                    <li name="activityRecord"><a href="/activityRecord/member/list.do"><i class="fa fa-circle-o"></i> 学生-报名记录列表</a></li>
                    </@shiro.hasPermission>

                    <li name="activityMember"><a href="/activity/association/list.do"><i class="fa fa-circle-o"></i> 活动信息管理</a></li>
                    <li name="activityRecordMember"><a href="/activityRecord/association/list.do"><i class="fa fa-circle-o"></i> 报名记录管理</a></li>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-edit"></i>
                    <span>设备借用申请</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <@shiro.hasPermission name="device/list">
                    <li name="deviceAdmin"><a href="/device/list.do"><i class="fa fa-circle-o"></i> 超管-设备列表</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="deviceRecord/admin/list">
                    <li name="LendReturnAdmin"><a href="/deviceRecord/admin/list.do"><i class="fa fa-circle-o"></i> 超管-借还审核</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="activityRecord/dmin/leadList">
                    <li name="leadListAdmin"><a href="/deviceRecord/admin/leadList.do"><i class="fa fa-circle-o"></i> 超管-设备借出历史</a>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="activityRecord/admin/returnList">
                    <li name="returnListAdmin"><a href="/deviceRecord/admin/returnList.do"><i class="fa fa-circle-o"></i> 超管-设备归还历史</a></li>
                    </@shiro.hasPermission>

                    <li name="listDevice"><a href="/device/listAsso.do"><i class="fa fa-circle-o"></i> 设备列表</a></li>
                    <li name="list"><a href="/deviceRecord/association/list.do"><i class="fa fa-circle-o"></i> 设备借还记录</a></li>
                    <li name="leadList"><a href="/deviceRecord/association/leadList.do"><i class="fa fa-circle-o"></i> 设备借用历史</a>
                    <li name="returnList"><a href="/deviceRecord/association/returnList.do"><i class="fa fa-circle-o"></i> 设备归还历史</a></li>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-laptop"></i>
                    <span>报表统计</span>
                    <span class="pull-right-container">
              <i class="fa fa-angle-left pull-right"></i>
            </span>
                </a>
                <ul class="treeview-menu">
                    <@shiro.hasPermission name="dataAdminReport/activityReportList">
                    <li name="activityReportListAdmin"><a href="/dataAdminReport/activityReportList.do"><i class="fa fa-circle-o"></i> 超管-活动记录报表</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="dataAdminReport/deviceLendReportList">
                    <li name="deviceLendReportListAdmin"><a href="/dataAdminReport/deviceLendReportList.do"><i class="fa fa-circle-o"></i> 超管-设备借用报表</a></li>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="dataAdminReport/deviceReturnReportList">
                    <li name="deviceReturnReportListAdmin"><a href="/dataAdminReport/deviceReturnReportList.do"><i class="fa fa-circle-o"></i> 超管-设备归还报表</a></li>
                    </@shiro.hasPermission>

                    <@shiro.hasPermission name="dataMemberReport/activityReportList">
                    <li name="dataMemberReport"><a href="/dataMemberReport/activityReportList.do"><i class="fa fa-circle-o"></i> 活动记录报表</a>
                    </@shiro.hasPermission>

                    <li name="activityReport"><a href="/dataAssociationReport/activityReportList.do"><i class="fa fa-circle-o"></i> 活动记录报表</a></li>
                    <li name="deviceLendReport"><a href="/dataAssociationReport/deviceReportList.do"><i class="fa fa-circle-o"></i> 设备借用报表</a></li>
                    <li name="deviceReturnReport"><a href="/dataAssociationReport/deviceReturnReportList.do"><i class="fa fa-circle-o"></i> 设备归还报表</a></li>
                </ul>
            </li>

        </ul>
    </section>
</aside>

<script>
    $(function () {
        //菜单初始
        $('.sidebar-menu').tree();
        //菜单激活
        var cuLi = $(".treeview-menu li[name='${currentMenu!}']");
        cuLi.addClass("active");
        cuLi.closest(".treeview").addClass("active")
    })
</script>